//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.come.setup;

import com.tool.tcpimg.UIUtils;
import org.come.setup.XSeTupJpanel;
import org.come.until.FormsManagement;
import org.come.until.Music;

import javax.swing.*;
import javax.swing.plaf.basic.BasicInternalFrameUI;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;

public class XSeTupJpanelxsjm extends JInternalFrame implements MouseListener {
    private XSeTupJpanel xSeTupJpanel = new XSeTupJpanel();
    private int first_x;
    private int first_y;

    public static XSeTupJpanelxsjm getXSeTupJpanelxsjm() {
        return (XSeTupJpanelxsjm)FormsManagement.getInternalForm(3102).getFrame();
    }

    public XSeTupJpanelxsjm() throws Exception {
        this.add(this.xSeTupJpanel);
        this.setBorder(BorderFactory.createEmptyBorder());
        ((BasicInternalFrameUI)this.getUI()).setNorthPane((JComponent)null);
        this.setBounds(80, 100, 438, 350);
        this.xSeTupJpanel.setBounds(0, 0, 438, 350);
        this.pack();
        this.setBackground(UIUtils.Color_BACK);
        this.setVisible(false);
        this.addMouseListener(this);
        this.addMouseMotionListener(new MouseMotionListener() {
            @Override
            public void mouseMoved(MouseEvent e) {
            }

            @Override
            public void mouseDragged(MouseEvent e) {
                if (XSeTupJpanelxsjm.this.isVisible()) {
                    int x = e.getX() - XSeTupJpanelxsjm.this.first_x;
                    int y = e.getY() - XSeTupJpanelxsjm.this.first_y;
                    XSeTupJpanelxsjm.this.setBounds(x + XSeTupJpanelxsjm.this.getX(), y + XSeTupJpanelxsjm.this.getY(), XSeTupJpanelxsjm.this.getWidth(), XSeTupJpanelxsjm.this.getHeight());
                }

            }
        });
    }

    @Override
    public void mouseClicked(MouseEvent e) {
    }

    @Override
    public void mousePressed(MouseEvent e) {
        Music.addyinxiao("关闭窗口.mp3");
        if (e.isMetaDown()) {
            FormsManagement.HideForm(3102);
        } else {
            FormsManagement.Switchinglevel(3102);
        }

        this.first_x = e.getX();
        this.first_y = e.getY();
    }

    @Override
    public void mouseReleased(MouseEvent e) {
    }

    @Override
    public void mouseEntered(MouseEvent e) {
    }

    @Override
    public void mouseExited(MouseEvent e) {
    }

    public XSeTupJpanel getXSeTupJpanel() {
        return this.xSeTupJpanel;
    }

    public void setXSeTupJpanel(XSeTupJpanel xSeTupJpanel) {
        this.xSeTupJpanel = xSeTupJpanel;
    }
}
